package edu.njust.dao;

import edu.njust.domain.Reservation;
import edu.njust.domain.StayRegister;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.List;

@Mapper
public interface ReservationMapper {
    //查找出需要登记入住的订单
    public StayRegister findStayRegister(int id);
    //新增预订
    public int insertAll(Reservation reservation);
    //分页和模糊查询
    public List<Reservation> pageFuzzyselect(@Param("consumerName")String consumerName, @Param("predetermineStateID")int predetermineStateID,
                                             @Param("start")int start, @Param("pageSize")int pageSize);
    //查询总条数
    public int countFuzzyselect(@Param("consumerName")String consumerName, @Param("predetermineStateID")int predetermineStateID);
    //id查询
    public Reservation findById(int id);
    //根据 旅客id 来查询
    public List<Reservation> findLvKeId(int id);
    //id删除
    public int deleteById(int id);
    //查询全部数据 无分页
    public List<Reservation> selectAll();
    //查询全部数据 分页
    public List<Reservation> pageselectAll(@Param("start")int start, @Param("pageSize")int pageSize);
    //修改预订到时提示
    public int updateRemind(int id);

    //修改预订状态1 变已安排
    public int updatePredetermineStateIDone(int id);
    //修改预订状态2 变未安排
    public int updatePredetermineStateIDtwo(int id);
    //修改房间
    public int updateroomID(int id,int roomID);
}
